Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up build #1650

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Speed up build #1650

wants to merge 2 commits into from

Conversation

bolyachevets
Copy link
Collaborator

Issue #, if available:

Description of changes: speed up namex-api and emailer builds --

Each line (aka command) in a Dockerfile is a layer. Docker uses a caching mechanism to store intermediate layers. Docker will reuse it from the cache rather than recreating it. This is where the order of instructions in the Dockerfile becomes important. Instructions that change frequently (e.g., copying application code) should be placed near the bottom of the Dockerfile. This ensures that changes in the application code trigger a rebuild of fewer layers, which is faster.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namex license (Apache 2.0).

Copy link
Collaborator

@EPortman EPortman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@bolyachevets bolyachevets marked this pull request as draft January 8, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants